<include file="Public/head"/>

<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <form class="form-horizontal" id="form" method="post" action="{:U('update')}">
                            <input name="varname" type="hidden" value="{$var.type}">
                            <input name="id" type="hidden" value="{$id}">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-0">
                                        驾照类型 </label>
                                    <div class="col-sm-9">
                                        <select id="type" name="type" class="col-xs-10 col-sm-5">
                                            <option value="0">--驾照类型--</option>
                                            <foreach name="license" item="vo">
                                                <if condition=" $vo['type'] eq $var['type'] ">
                                                    <option value="{$vo.type}" selected>{$vo.type}</option>
                                                    <else/>
                                                    <option value="{$vo.type}">{$vo.type}</option>
                                                </if>
                                            </foreach>
                                        </select>
                                    </div>
                                </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 驾照描述 </label>
                                <div class="col-sm-9">
                                    <input type="text"
                                           name="notes"
                                           id="notes"
                                           placeholder="驾照描述，例：小型自动挡汽车 小型、微型自动挡载客汽车" class="col-xs-10 col-sm-5"
                                           value="{$var.notes}">
                                </div>
                            </div>
                            <div class="space-4"></div>

                            <div class="col-md-offset-2 col-md-9">
                                <button class="btn btn-info submit" type="button">
                                    <i class="icon-ok bigger-110"></i>
                                    提交
                                </button>

                                &nbsp; &nbsp; &nbsp;
                                <button class="btn" type="reset">
                                    <i class="icon-undo bigger-110"></i>
                                    重置
                                </button>
                            </div>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(function () {
        $(".btn-info.submit").click(function () {
            var webname = $("#webname").val();
            var url = $("#url").val();
            if (webname == 0) {
                bootbox.dialog({
                    title: '友情提示：',
                    message: "标题必须选择。",
                    buttons: {
                        "success": {
                            "label": "确定",
                            "className": "btn-danger"
                        }
                    }
                });
                return;
            }
            if (url == '') {
                bootbox.dialog({
                    title: '友情提示：',
                    message: "链接地址必须填写。",
                    buttons: {
                        "success": {
                            "label": "确定",
                            "className": "btn-danger"
                        }
                    }
                });
                return;
            }
            $("#form").submit();
        });
    });
</script>
</body>
</html>
